﻿using System;
using System.Collections.Generic;
using System.Text;

namespace WebLog
{
    public interface ITypeFactory
    {
        Exception CreateBizException(string errMsg, int? errorCode = null, object errorData = null);
        object CreateBaseBizResult(string Message, bool Success = false, int? errorCode = null, object errorData = null, object data = null);
        Type GetBaseBizResultType();
        void SendMsg(string msg, string msgTitle = null);
    }
    public class DefaultTypeFactory : ITypeFactory
    {
        public object CreateBaseBizResult(string Message, bool Success = false, int? errorCode = null, object errorData = null, object data = null)
            => throw new NotImplementedException("必须实现工厂接口");

        public Exception CreateBizException(string errMsg, int? errorCode = null, object errorData = null)
            => throw new NotImplementedException("必须实现工厂接口");

        public Type GetBaseBizResultType()
            => throw new NotImplementedException("必须实现工厂接口");
        public void SendMsg(string msg, string msgTitle = null)
            => throw new NotImplementedException("必须实现工厂接口");
    }
}
